import Axios from 'axios';
import { ObjTypes } from '../appTypes';

export const request = (props:{
  url:string,
  methods:"get"|"post",
  query?:ObjTypes,
  data?:ObjTypes,
  headers?:ObjTypes,
})=>{
  return Axios({
    method:props.methods,
    url:props.url,
    params:props.query,
    data:props.data,
    headers:props.headers,
  })
}